home *** CD-ROM | disk | FTP | other *** search
/ CD ROM Paradise Collection 4 / CD ROM Paradise Collection 4 1995 Nov.iso / basic / expvbx10.zip / EXPR.TXT < prev    next >
Text File  |  1995-03-16  |  3KB  |  79 lines

  1. -----------------------------------------------------------------
  2. Expr.vbx v1.0
  3. Copyright, March 1995, Minxiu Chen, All Rights Reserved
  4. ----------------------------------------------------------------
  5. ===========
  6. The program
  7. ===========
  8.  
  9. Expr.vbx is a vbx file, which parses the text inputed by the user to
  10. see if it is a numerical expression.  If so,  it do infix arithmetic 
  11. expression parsing. 
  12.  
  13. The source code is written in C. It use so called "recursive descent" 
  14. technique and  analysis the text to be set at the property "Strinput".
  15. The  results  will be given at properties "NumValue", "IsNumExpr" and
  16.  "StrLength."
  17.  
  18. It supports operators:
  19. " +,  -,  *,  /, %,  ^ " 
  20.  
  21. and functions: 
  22. " sin,  cos, tan, ctg or ctn, asin,  acos, atg, ln, lg or log10,  
  23. exp, abs, sqrt, sqrt3, fix, rand or rnd."
  24.  
  25. and constants:
  26. "pi or Pi, e"
  27.  
  28. All these functions are self-explanatory, 
  29.     sqrt3(8) --> 2,
  30.     rand(10) --> a random value between 0 and 10
  31.     11%4 --> 3
  32.     15.2%4.2 --> 2.6
  33.     230 could be written as 2.3E2
  34.     3^3 -->27
  35.     (123 + sin(pi/2)) * 4^5* ln(exp(56))%11->3
  36.  
  37. A demo VB code and a dll file are also included.
  38.  
  39. Functions provided by expr.dll:
  40.  
  41. float _export   far pascal expres( char FAR *S)
  42. int  far pascal chkexpr(char FAR *S)
  43.  
  44. The declare statement for VB:
  45. Declare Function chkexpr Lib "expr.dll" (ByVal S As String) As Integer
  46. Declare Function expres Lib "expr.dll" (ByVal S As String) As Double
  47.  
  48. ============
  49. Registration                                                                                               Registration
  50. ============
  51.  
  52. The program EXPR.VBX is distributed as a shareware program. It is 
  53. distributed in completed state, there are no nagging message. 
  54. You have the right to test this program for 10 days. You are 
  55. allowed to copy this package  and give it to any other person, 
  56. as long as it is not modified in any way.
  57.  
  58. after the trial period, If you find it useful and want to keep using it,
  59. You are obliged to register your copy. when updated, the registered user
  60. will automatic get one newer version.
  61.  
  62. This software may NOT be used for commercial purpose without registration. 
  63.  
  64.  
  65. ==========
  66. Disclaimer
  67. ==========
  68.  
  69. The program has been tested to keep it as bug-free.  But I still 
  70. declare that it is supplied "As is"  without warranty of any kind. 
  71. You use it at your own risk.   I accept no responsibility for
  72. any damage or loss, physical, financial, or otherwise, that may
  73. result from the use.
  74.  
  75. If these terms are not acceptable to you, then you have NO license 
  76. to use or test EXPR.VBX. You should IMMEDIATELY DELETE it from
  77. your disks.
  78.  
  79.